<template>
  <v-alert class="tip" transition="scroll-y-transition" v-model="visable" :type="type" dismissible>
    {{ msg }}
  </v-alert>
</template>
<script>
export default {
  name: "JcAlert",
  props: {
    type: {
      type: String,
      default: "success",
    },
    msg: {
      type: String,
      default: "请输入提示语",
    },
  },
  data() {
    return {
      visable: false,
    };
  },
  methods: {
    show() {
      this.visable = true;
    },
    hide() {
      this.visable = false;
    },
  },
};
</script>
<style scoped>
.tip {
  position: absolute;
  top: 20px;
  width: 260px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
</style>
